#pragma once
#include"Rbtree.h"
template<class K>
class myset {
public:
	struct getvalofset {
		const K& operator()(const K& k)
		{
			return k;
		}
	};

	typedef typename rbtree<K, K, getvalofset>::iterator iterator;
	typedef typename rbtree<K, K, getvalofset>::const_iterator  const_iterator;

	iterator begin()
	{
		return _t.begin();
	}

	iterator end()
	{
		return _t.end();
	}

	const_iterator cbegin()
	{
		return _t.cbegin();
	}

	const_iterator cend()
	{
		return _t.cend();
	}

	pair<iterator, bool>  insert(const K& key)
	{
		return _t.insert(key);
	}

private:
	rbtree<K, K, getvalofset> _t;
};

void settest()
{
	myset<int> s1;
	s1.insert(1);
	s1.insert(33);
	s1.insert(41);
	s1.insert(122);
	s1.insert(11);
	s1.insert(9);
	s1.insert(13);
}
